import math
from typing import List


class Solution:
    def findGCD(self, nums: List[int]) -> int:
        return math.gcd(max(nums), min(nums))


if __name__ == "__main__":
    print(Solution().findGCD(nums=[2, 5, 6, 9, 10]))  # 2
    print(Solution().findGCD(nums=[7, 5, 6, 8, 3]))  # 1
    print(Solution().findGCD(nums=[3, 3]))  # 3
